import { createBrowserRouter, RouterProvider } from 'react-router-dom'
import { lazy } from 'react'

const router = createBrowserRouter([
  {
    path: '/',
    Component: lazy(() => import('@/pages/home')),
  },
  {
    path: 'demo',
    Component: lazy(() => import('@/pages/demo')),
  },
])

export default function Router() {
  return <RouterProvider router={router} fallbackElement={<p>Loading...</p>} />
}
